package model;

/***
 * Employee object
 * @author thainguyen
 *
 */

public class Employee {
	int userid;
	String username;
	String password;
	String fullname;
	String email;
	Title title;
	Project project;
	String employeeId;
	
	public Employee() {
		title = new Title();
		project = new Project();
	}

	
	public Employee(int userid, String username, String password,
			String fullname, String email, Title title, Project project,
			String employeeId) {
		this.userid = userid;
		this.username = username;
		this.password = password;
		this.fullname = fullname;
		this.email = email;
		this.title = title;
		this.project = project;
		this.employeeId = employeeId;
	}

	
	public int getUserid() {
		return userid;
	}

	public void setUserid(int userid) {
		this.userid = userid;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getFullname() {
		return fullname;
	}

	public void setFullname(String fullname) {
		this.fullname = fullname;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	
	public Title getTitle() {
		return title;
	}


	public void setTitle(Title title) {
		this.title = title;
	}


	public Project getProject() {
		return project;
	}


	public void setProject(Project project) {
		this.project = project;
	}


	public String getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(String employeeId) {
		this.employeeId = employeeId;
	};
	
	@Override
	public String toString() {
		StringBuilder str = new StringBuilder("");
		str.append(userid).append(" - ").append(username).append(" - ").append(fullname).append(" - ");
		str.append(email).append(" - ").append(title.getTitleName()).append(" - ").append(project.getProjectName()).append(" - ").append(employeeId);
		
		return str.toString();
	}
}
